
<%@page import="com.test.entity.WriteEntity"%>
<%@ page language="java"
	import="java.util.*, java.sql.*,com.test.database.ConnectionFactory"
	contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>


<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>成功</title>
<script type="text/javascript">  
    function check(form) {  
        with (form) {  
            if (bookCount.value == "") {  
                alert("请输入更新数量！");  
                return false;  
            }  
            if (isNaN(bookCount.value)) {  
                alert("格式错误！");  
                return false;  
            }  
            return true;  
        }  
    }  
</script>
<link href="table/css/table.css" rel="stylesheet" type="text/css" />

<style>
.two {
	float: right;
	margin-bottom: 10px;
}

.operate {
	width: 200px;
}

.body_top {
	width: 100%;
	height: 60px;
	background: rgb(0, 128, 64);
	color: #fff;
	line-height: 60px;
	margin-bottom: 15px;
}

.body_top_1 {
	font-size: 24px;
}

.body_top_2 {
	font-size: 18px;
	font-family: 华文楷体;
}

a {
	text-decoration: none;
	color: #232323;
}
</style>
</head>

<body>
	<div class="body_top">
		<span class="body_top_1" style="float: left; padding-left: 20px;">小七测试</span>
		<span class="body_top_2" style="float: right; padding-right: 20px;">
			<a href="index1.jsp" style="color: #fff;">首页</a> <a href=""
			style="color: #fff;">消息</a> <a href="person.jsp" style="color: #fff;">个人中心</a>
			<a href="invalidate.jsp" style="color: #fff;">注销</a>


		</span>
	</div>

	<div class="one">
		测试编号： <input name="select_id" id="select_id" type="text"> <input
			type="submit" value="查询"
			onclick="window.location.href='commentcase.jsp?select_id=1'"
			style="cursor: pointer; background-color: yellowgreen;">

	</div>

	<div class="two">
		<input type="button" class="add" name="add" value="添加用例"
			onclick="window.location.href='write2.jsp'"
			style="cursor: pointer; background-color: aqua; font-family: 黑体;">
	</div>

	<div class="three">
		<table>
			<thead>
				<tr>
					<th>用例编号</th>
					<th>用例标题</th>
					<th>测试用户</th>
					<th>测试类型</th>
					<th>测试内容</th>
					<th>预计结果</th>
					<th>实际结果</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
				<%
		//获取用例信息集合
		List<WriteEntity> list = (List<WriteEntity>)request.getAttribute("list");
                	if(list==null||list.size()<1){
                		out.print("没有数据");
                	}else{
                		for(WriteEntity writeEntity:list){
                %>
				<tr>
					<td><%=writeEntity.getId() %></td>
					<td><%=writeEntity.getTitle() %></td>
					<td><%=writeEntity.getName() %></td>
					<td><%=writeEntity.getType()%></td>
					<td><%=writeEntity.getText()%></td>
					<td><%=writeEntity.getExpectResults()%></td>
					<td><%=writeEntity.getActualResults()%></td>
					<td class="operate"><input type="submit" value="执行"
						style="cursor: pointer"
						onclick="window.location.href='demo.jsp?id=<%=writeEntity.getId() %>'">
						<input type="submit" value="修改"
						style="background-color: aquamarine; cursor: pointer;"
						onclick="window.location.href='updateTestcase.jsp?id=<%=writeEntity.getId() %>'">
						<input type="submit" value="删除"
						style="color: red; margin-left: 10px"
						onclick="var r=confirm('确定要删除该记录吗？删除后将不能恢复！'); if(r==true){window.location.href='deleteTestcase?id=<%=writeEntity.getId()%>';}">
						<!-- <a href="findServlet.do" style="cursor:pointer" onclick="var r=confirm('确定要删除该记录吗？删除后将不能恢复！'); if(r==true){window.location.href='deleteTestcase?id=<%=writeEntity.getId()%>';} ">删除</a>-->
					</td>
				</tr>
				<%
					}
					}
				%>
				<tr>
					<td></td>
					<td></td>
					<td></td>
					<td></td>
					<td></td>
					<td></td>
					<td></td>
					<td></td>
				</tr>
				<tr>
					<td></td>
					<td></td>
					<td></td>
					<td></td>
					<td></td>
					<td></td>
					<td></td>
					<td></td>
				</tr>
				<tr>
					<td></td>
					<td></td>
					<td></td>
					<td></td>
					<td></td>
					<td></td>
					<td></td>
					<td></td>
				</tr>
				<tr>
					<td></td>
					<td></td>
					<td></td>
					<td></td>
					<td></td>
					<td></td>
					<td></td>
					<td></td>
				</tr>
				<tr>
					<td></td>
					<td></td>
					<td></td>
					<td></td>
					<td></td>
					<td></td>
					<td></td>
					<td></td>
				</tr>

			</tbody>
		</table>
	</div>
	</form>
</body>

</html>
</html>